home *** CD-ROM | disk | FTP | other *** search
- property ancestor, pMIAW
- global gEnvironObj, gGraphHelp, gGraph, gOKAlert
-
- on new me, buttonName, castName, theChannel, theStageLoc, descendant
- if objectp(descendant) then
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, descendant)
- else
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, me)
- end if
- return me
- end
-
- on setMIAW me, miaw
- pMIAW = miaw
- return me
- end
-
- on performFunction me
- oldDelimiter = the itemDelimiter
- the itemDelimiter = RETURN
- titleEmpty = (item 1 of the text of field "title field" = " ") or (item 1 of the text of field "title field" = EMPTY)
- xLabelEmpty = (item 1 of the text of field "x label field" = " ") or (item 1 of the text of field "x label field" = EMPTY)
- yLabelEmpty = (item 1 of the text of field "y label field" = " ") or (item 1 of the text of field "y label field" = EMPTY)
- if titleEmpty and (getaProp(gGraph, #pChartType) = 0) then
- tell the stage
- openAlertWindow("okalert", rect(0, 0, 320, 171), "Please type in graph title before continuing.")
- end tell
- else
- if (titleEmpty or xLabelEmpty or yLabelEmpty) and (getaProp(gGraph, #pChartType) <> 0) then
- tell the stage
- openAlertWindow("okalert", rect(0, 0, 320, 171), "Please type in graph and axis titles before continuing.")
- end tell
- else
- setaProp(gGraph, #pIsConsistant, 0)
- setaProp(gGraph, #pTitle, item 1 of the text of field "title field")
- set the text of field "graph wizard title" to "Graph Wizard:" && item 1 of the text of field "title field"
- setaProp(gGraph, #pXLabel, item 1 of the text of field "x label field")
- set the text of field "domain" to item 1 of the text of field "x label field"
- setaProp(gGraph, #pYLabel, item 1 of the text of field "y label field")
- set the text of field "range" to item 1 of the text of field "y label field"
- outScope(pMIAW)
- if windowPresent("Graph Help") then
- closeMe(gGraphHelp)
- end if
- go(getNextPage(pMIAW))
- end if
- end if
- the itemDelimiter = oldDelimiter
- return me
- end
-